package com.slz3.business.module.memberManagement.memPoint.steward;

import com.slz3.business.frame.response.RR;
import com.slz3.business.frame.response.ResInfo;
import com.slz3.business.module.memberManagement.memPoint.domain.MemPoint;
import com.slz3.business.module.memberManagement.memPoint.domain.MemPointCondition;
import org.springframework.stereotype.Component;
import org.springframework.web.reactive.function.server.ServerRequest;
import org.springframework.web.reactive.function.server.ServerResponse;
import reactor.core.publisher.Mono;

public class MemPointResAtomic extends MemPointResExecutor {

    public Mono<ServerResponse> add_$MemPointUpdateLock(ServerRequest req, MemPoint memPoint) {
        return MemPointResSafeValid.add(req, memPoint) ?
                RR.fail(req, ResInfo.builder().theme(RR.SAFE_VALID).build()) :
                super.add(req, memPoint);
    }

    public Mono<ServerResponse> delete_$MemPointUpdateLock(ServerRequest req, MemPointCondition memPointCondition) {
        return MemPointResSafeValid.delete(req, memPointCondition) ?
                RR.fail(req, ResInfo.builder().theme(RR.SAFE_VALID).build()) :
                super.delete(req);
    }

    public Mono<ServerResponse> modify_$MemPointUpdateLock(ServerRequest req, MemPoint memPoint) {
        return MemPointResSafeValid.modify(req, memPoint) ?
                RR.fail(req, ResInfo.builder().theme(RR.SAFE_VALID).build()) :
                super.modify(req, memPoint);
    }

    public Mono<ServerResponse> info_$MemPointUpdateLock(ServerRequest req) {
        return MemPointResSafeValid.info(req) ?
                RR.fail(req, ResInfo.builder().theme(RR.SAFE_VALID).build()) :
                super.info(req);
    }

    public Mono<ServerResponse> auditSubmit_$MemPointUpdateLock(ServerRequest req, MemPointCondition memPointCondition) {
        return MemPointResSafeValid.auditSubmit(req, memPointCondition) ?
                RR.fail(req, ResInfo.builder().theme(RR.SAFE_VALID).build()) :
                super.auditSubmit(req);
    }

    public Mono<ServerResponse> audit_$MemPointUpdateLock(ServerRequest req, MemPointCondition memPointCondition) {
        return MemPointResSafeValid.audit(req, memPointCondition) ?
                RR.fail(req, ResInfo.builder().theme(RR.SAFE_VALID).build()) :
                super.audit(req);
    }

    public Mono<ServerResponse> auditReject_$MemPointUpdateLock(ServerRequest req, MemPointCondition memPointCondition) {
        return MemPointResSafeValid.auditReject(req, memPointCondition) ?
                RR.fail(req, ResInfo.builder().theme(RR.SAFE_VALID).build()) :
                super.auditReject(req);
    }


    public Mono<ServerResponse> usingEnable_$MemPointUpdateLock(ServerRequest req, MemPointCondition memPointCondition) {
        return MemPointResSafeValid.usingEnable(req, memPointCondition) ?
                RR.fail(req, ResInfo.builder().theme(RR.SAFE_VALID).build()) :
                super.usingEnable(req);
    }

    public Mono<ServerResponse> usingDisable_$MemPointUpdateLock(ServerRequest req, MemPointCondition memPointCondition) {
        return MemPointResSafeValid.usingDisable(req, memPointCondition) ?
                RR.fail(req, ResInfo.builder().theme(RR.SAFE_VALID).build()) :
                super.usingDisable(req);
    }
}
